package com.fulihui.wgj.schedule.annotation;

import java.lang.annotation.*;

/**
 * zookeeper分布式锁注解
 *
 * @author: Levon
 * @version: v 0.1 2018-06-11 15:00
 */
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface MutexLock {

    /**
     * 锁的节点
     *
     * @return
     */
    String node();

    /**
     * 超时时间，单位秒
     *
     * @return
     */
    int timeout() default 1;
}
